package cn.sh.yhk.controller.basic;

import cn.sh.yhk.model.basic.SFile;
import cn.sh.yhk.service.basic.JdbcService;
import cn.sh.yhk.vo.BasicVo;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;

/**
 * @Auther: adminyhk
 * @Date: 2018/10/31 08:38
 * @Description:
 */
@ResponseBody
@Controller
public class JdbcController {

    @Resource
    JdbcService jdbcService;

//    @Resource
//    OracleMapper oracleMapper;

//    @Resource
//    TTeamSegMapper tTeamSegMapper;

    @PostMapping("/getsql")
    BasicVo teqs(String name) {
        return jdbcService.getSql(name);
    }

//    @GetMapping("/testo")
//    Long teqs() {
//        Page pagee = PageHelper.startPage(1, 10);
//        List<TTeamSeg   > list = tTeamSegMapper.selectByExample(new TTeamSegExample());
//        PageInfo info = new PageInfo<>(pagee.getResult());
//        return oracleMapper.getSql();
//    }

    @PostMapping("/mvc")
    BasicVo teqs(@RequestBody SFile sFile) {
        return BasicVo.success("1");
    }
}
